<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\User;
use Illuminate\Support\Facades\Hash;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        User::create([
            'name' => 'admin',
            'nickname' => '四季豆',
            'email' => 'admin@example.com',
            'password' => Hash::make('123456'),
            'avatar' => 'avatars/avatar_1_1751027108.jpg',
        ]);

        $this->command->info('测试用户创建成功！');
        $this->command->info('用户名: admin');
        $this->command->info('密码: 123456');
    }
}
